

<!DOCTYPE html>


<html lang="zh-CN" >

  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

    <title>AndroidBot &#8212; Aibote  文档</title>
  
  
  
  <script data-cfasync="false">
    document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
    document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
  </script>
  
  <!-- Loaded before other Sphinx assets -->
  <link href="../../_static/styles/theme.css?digest=12da95d707ffb74b382d" rel="stylesheet" />
<link href="../../_static/styles/bootstrap.css?digest=12da95d707ffb74b382d" rel="stylesheet" />
<link href="../../_static/styles/pydata-sphinx-theme.css?digest=12da95d707ffb74b382d" rel="stylesheet" />

  
  <link href="../../_static/vendor/fontawesome/6.1.2/css/all.min.css?digest=12da95d707ffb74b382d" rel="stylesheet" />
  <link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/tabs.css" />
  
  <!-- Pre-loaded scripts that we'll load fully later -->
  <link rel="preload" as="script" href="../../_static/scripts/bootstrap.js?digest=12da95d707ffb74b382d" />
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=12da95d707ffb74b382d" />

    <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/sphinx_highlight.js"></script>
    <script src="../../_static/clipboard.min.js"></script>
    <script src="../../_static/copybutton.js"></script>
    <script src="../../_static/tabs.js"></script>
    <script>let toggleHintShow = 'Click to show';</script>
    <script>let toggleHintHide = 'Click to hide';</script>
    <script>let toggleOpenOnPrint = 'true';</script>
    <script src="../../_static/togglebutton.js"></script>
    <script src="../../_static/translations.js"></script>
    <script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
    <script>DOCUMENTATION_OPTIONS.pagename = 'dev_manual/android_bot/index';</script>
    <link rel="index" title="索引" href="../../genindex.html" />
    <link rel="search" title="搜索" href="../../search.html" />
    <link rel="next" title="WebBot" href="../web_bot/index.html" />
    <link rel="prev" title="Aibote 开发手册" href="../index.html" />
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <meta name="docsearch:language" content="zh-CN"/>
  </head>
  
  
  <body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">

  
  
  <a class="skip-link" href="#main-content">Skip to main content</a>
  
  <input type="checkbox"
          class="sidebar-toggle"
          name="__primary"
          id="__primary"/>
  <label class="overlay overlay-primary" for="__primary"></label>
  
  <input type="checkbox"
          class="sidebar-toggle"
          name="__secondary"
          id="__secondary"/>
  <label class="overlay overlay-secondary" for="__secondary"></label>
  
  <div class="search-button__wrapper">
    <div class="search-button__overlay"></div>
    <div class="search-button__search-container">
<form class="bd-search d-flex align-items-center"
      action="../../search.html"
      method="get">
  <i class="fa-solid fa-magnifying-glass"></i>
  <input type="search"
         class="form-control"
         name="q"
         id="search-input"
         placeholder="Search the docs ..."
         aria-label="Search the docs ..."
         autocomplete="off"
         autocorrect="off"
         autocapitalize="off"
         spellcheck="false"/>
  <span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form></div>
  </div>
  
    <nav class="bd-header navbar navbar-expand-lg bd-navbar">
<div class="bd-header__inner bd-page-width">
  <label class="sidebar-toggle primary-toggle" for="__primary">
    <span class="fa-solid fa-bars"></span>
  </label>
  
  <div class="navbar-header-items__start">
    
      <div class="navbar-item">
  

<a class="navbar-brand logo" href="../../index.html">
  
  
  
  
  
    <p class="title logo__title">Aibote  文档</p>
  
</a></div>
    
  </div>
  
  
  <div class="col-lg-9 navbar-header-items">
    
    <div class="me-auto navbar-header-items__center">
      
        <div class="navbar-item"><nav class="navbar-nav">
  <p class="sidebar-header-items__title"
     role="heading"
     aria-level="1"
     aria-label="Site Navigation">
    Site Navigation
  </p>
  <ul class="bd-navbar-elements navbar-nav">
    
                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../user_guide/index.html">
                        Aibote 基本使用
                      </a>
                    </li>
                

                    <li class="nav-item current active">
                      <a class="nav-link nav-internal" href="../index.html">
                        Aibote 开发手册
                      </a>
                    </li>
                

                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../reference/index.html">
                        API 参考
                      </a>
                    </li>
                

                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../api_protocol/aiboteProtocol.html">
                        API 开源协议
                      </a>
                    </li>
                
  </ul>
</nav></div>
      
    </div>
    
    
    <div class="navbar-header-items__end">
      
        <div class="navbar-item navbar-persistent--container">
          
<script>
document.write(`
  <button class="btn btn-sm navbar-btn search-button search-button__button" title="搜索" aria-label="搜索" data-bs-placement="bottom" data-bs-toggle="tooltip">
    <i class="fa-solid fa-magnifying-glass"></i>
  </button>
`);
</script>
        </div>
      
      
        <div class="navbar-item">
<script>
document.write(`
  <button class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
    <span class="theme-switch" data-mode="light"><i class="fa-solid fa-sun"></i></span>
    <span class="theme-switch" data-mode="dark"><i class="fa-solid fa-moon"></i></span>
    <span class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></span>
  </button>
`);
</script></div>
      
    </div>
    
  </div>
  
  
    <div class="navbar-persistent--mobile">
<script>
document.write(`
  <button class="btn btn-sm navbar-btn search-button search-button__button" title="搜索" aria-label="搜索" data-bs-placement="bottom" data-bs-toggle="tooltip">
    <i class="fa-solid fa-magnifying-glass"></i>
  </button>
`);
</script>
    </div>
  

  
    <label class="sidebar-toggle secondary-toggle" for="__secondary">
      <span class="fa-solid fa-outdent"></span>
    </label>
  
</div>

    </nav>
  
  <div class="bd-container">
    <div class="bd-container__inner bd-page-width">
      
      <div class="bd-sidebar-primary bd-sidebar">
        

  
  <div class="sidebar-header-items sidebar-primary__section">
    
    
      <div class="sidebar-header-items__center">
        
          <div class="navbar-item"><nav class="navbar-nav">
  <p class="sidebar-header-items__title"
     role="heading"
     aria-level="1"
     aria-label="Site Navigation">
    Site Navigation
  </p>
  <ul class="bd-navbar-elements navbar-nav">
    
                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../user_guide/index.html">
                        Aibote 基本使用
                      </a>
                    </li>
                

                    <li class="nav-item current active">
                      <a class="nav-link nav-internal" href="../index.html">
                        Aibote 开发手册
                      </a>
                    </li>
                

                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../reference/index.html">
                        API 参考
                      </a>
                    </li>
                

                    <li class="nav-item">
                      <a class="nav-link nav-internal" href="../../api_protocol/aiboteProtocol.html">
                        API 开源协议
                      </a>
                    </li>
                
  </ul>
</nav></div>
        
      </div>
    
    
    
      <div class="sidebar-header-items__end">
        
          <div class="navbar-item">
<script>
document.write(`
  <button class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
    <span class="theme-switch" data-mode="light"><i class="fa-solid fa-sun"></i></span>
    <span class="theme-switch" data-mode="dark"><i class="fa-solid fa-moon"></i></span>
    <span class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></span>
  </button>
`);
</script></div>
        
      </div>
    
  </div>
  
    <div class="sidebar-primary-items__start sidebar-primary__section">
        <div class="sidebar-primary-item"><nav class="bd-docs-nav bd-links"
     aria-label="Section Navigation">
  <p class="bd-links__title" role="heading" aria-level="1">Section Navigation</p>
  <div class="bd-toc-item navbar-nav"><ul class="current nav bd-sidenav">
<li class="toctree-l1 current active"><a class="current reference internal" href="#">AndroidBot</a></li>
<li class="toctree-l1"><a class="reference internal" href="../web_bot/index.html">WebBot</a></li>
<li class="toctree-l1"><a class="reference internal" href="../window_bot/index.html">WindowBot</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ui/index.html">界面开发</a></li>
<li class="toctree-l1"><a class="reference internal" href="../web_socket_bot/index.html">WebSocketBot</a></li>
<li class="toctree-l1"><a class="reference internal" href="../multimodule_mixing/index.html">多模块混合开发</a></li>
</ul>
</div>
</nav></div>
    </div>
  
  
  <div class="sidebar-primary-items__end sidebar-primary__section">
  </div>
  
  <div id="rtd-footer-container"></div>


      </div>
      
      <main id="main-content" class="bd-main">
        
        
          <div class="bd-content">
            <div class="bd-article-container">
              
              <div class="bd-header-article">
<div class="header-article-items header-article__inner">
  
    <div class="header-article-items__start">
      
        <div class="header-article-item">



<nav aria-label="Breadcrumbs">
  <ul class="bd-breadcrumbs" role="navigation" aria-label="Breadcrumb">
    
    <li class="breadcrumb-item breadcrumb-home">
      <a href="../../index.html" class="nav-link" aria-label="Home">
        <i class="fa-solid fa-home"></i>
      </a>
    </li>
    
    <li class="breadcrumb-item"><a href="../index.html" class="nav-link">Aibote 开发手册</a></li>
    
    <li class="breadcrumb-item active" aria-current="page">AndroidBot</li>
  </ul>
</nav>
</div>
      
    </div>
  
  
</div>
</div>
              
              
              
                
<div id="searchbox"></div>
                <article class="bd-article" role="main">
                  
  <section id="androidbot">
<h1>AndroidBot<a class="headerlink" href="#androidbot" title="此标题的永久链接">#</a></h1>
<section id="id1">
<h2>主函数示例<a class="headerlink" href="#id1" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-0-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-0-0-0" name="0-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-0-0-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-0-0-1" name="0-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-0-0-0" class="sphinx-tabs-panel" id="panel-0-0-0" name="0-0" role="tabpanel" tabindex="0"><div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">const</span><span class="w"> </span><span class="nx">AndroidBot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">require</span><span class="p">(</span><span class="s1">&#39;AndroidBot&#39;</span><span class="p">);</span><span class="w">  </span><span class="c1">// 引用AndroidBot模块</span><span class="w"></span>

<span class="c1">// 注册主函数，安卓端连接脚本会自动调用androidMain，并传递AndroidBot对象。设置服务端监听端口，手机端默认连接端口16678</span><span class="w"></span>
<span class="nx">AndroidBot</span><span class="p">.</span><span class="nx">registerMain</span><span class="p">(</span><span class="nx">androidMain</span><span class="p">,</span><span class="w"> </span><span class="mf">16678</span><span class="p">);</span><span class="w"></span>

<span class="cm">/**用作代码提示，androidMain函数会被多次调用，注意使用全局变量</span>
<span class="cm"> * @param {AndroidBot} androidBot</span>
<span class="cm"> */</span><span class="w"></span>
<span class="k">async</span><span class="w"> </span><span class="kd">function</span><span class="w"> </span><span class="nx">androidMain</span><span class="p">(</span><span class="nx">androidBot</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">await</span><span class="w"> </span><span class="nx">androidBot</span><span class="p">.</span><span class="nx">setImplicitTimeout</span><span class="p">(</span><span class="mf">3000</span><span class="p">);</span><span class="w">  </span><span class="c1">// 设置隐式等待时间</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="nx">point</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">await</span><span class="w"> </span><span class="nx">androidBot</span><span class="p">.</span><span class="nx">findColor</span><span class="p">(</span><span class="s2">&quot;#0e76b1&quot;</span><span class="p">);</span><span class="w">  </span><span class="c1">// 查找指定颜色值坐标点</span><span class="w"></span>
<span class="w">    </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">point</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div><div aria-labelledby="tab-0-0-1" class="sphinx-tabs-panel" hidden="true" id="panel-0-0-1" name="0-1" role="tabpanel" tabindex="0"><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># 1. 导入 AndroidBotMain 类</span>
<span class="kn">from</span> <span class="nn">AiBot</span> <span class="kn">import</span> <span class="n">AndroidBotMain</span>


<span class="c1"># 2. 自定义一个脚本类，继承 AndroidBotMain</span>
<span class="k">class</span> <span class="nc">CustomAndroidScript</span><span class="p">(</span><span class="n">AndroidBotMain</span><span class="p">):</span>
    <span class="c1"># 3. 设置等待参数</span>
    <span class="c1"># 3.1 设置等待时间</span>
    <span class="n">wait_timeout</span> <span class="o">=</span> <span class="mi">3</span>
    <span class="c1"># 3.2 设置重试间隔时长</span>
    <span class="n">interval_timeout</span> <span class="o">=</span> <span class="mf">0.5</span>

    <span class="c1"># 4. 设置日志等级</span>
    <span class="n">log_level</span> <span class="o">=</span> <span class="s2">&quot;INFO&quot;</span>  <span class="c1"># &quot;DEBUG&quot;</span>

    <span class="c1"># 5. 设置方法超时是否抛出异常</span>
    <span class="n">raise_err</span> <span class="o">=</span> <span class="kc">False</span>  <span class="c1"># True</span>

    <span class="c1"># 6. 重写方法，编写脚本</span>
    <span class="c1"># 注意：此方法是脚本执行入口</span>
    <span class="k">def</span> <span class="nf">script_main</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="c1"># 6.1 API 演示</span>
        <span class="c1"># 注意：Python 版本支持的 Api 与 Nodejs 基本相同</span>
        <span class="c1"># 教程中仅演示部分 Api，更多 Api 请自行探索，所有 Api 均包含详细的参数要求和返回值，请自行查看。</span>

        <span class="c1"># 截图</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">save_screenshot</span><span class="p">(</span><span class="s2">&quot;xxx.png&quot;</span><span class="p">)</span>
        <span class="c1"># 获取坐标点颜色</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">get_color</span><span class="p">((</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">))</span>
        <span class="c1"># 查找图片</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">find_image</span><span class="p">(</span><span class="s2">&quot;xxx.png&quot;</span><span class="p">)</span>
        <span class="c1"># 点击坐标</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">click</span><span class="p">((</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">))</span>
        <span class="c1"># 滑动</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">swipe</span><span class="p">((</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">),</span> <span class="p">(</span><span class="mi">200</span><span class="p">,</span> <span class="mi">200</span><span class="p">),</span> <span class="mi">3</span><span class="p">)</span>


<span class="c1"># 7. 执行脚本，Pycharm 中，直接右键执行</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
    <span class="c1"># 注意：此处监听的端口号，必须和手机端的脚本端口号一致；</span>
    <span class="c1"># 监听 3333 号端口</span>
    <span class="n">CustomAndroidScript</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="mi">3333</span><span class="p">)</span>
</pre></div>
</div>
</div></div>
</section>
<section id="id2">
<h2>等待超时<a class="headerlink" href="#id2" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-1-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-1-1-0" name="1-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-1-1-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-1-1-1" name="1-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-1-1-0" class="sphinx-tabs-panel" id="panel-1-1-0" name="1-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.setImplicitTimeout">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">setImplicitTimeout</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">waitMs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intervalMs=5</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.setImplicitTimeout" title="永久链接至目标">#</a></dt>
<dd><p>设置隐式等待</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>waitMs</strong> (<em>number</em>) – 等待时间,单位毫秒</p></li>
<li><p><strong>intervalMs</strong> (<em>number</em>) – 心跳间隔，单位毫秒。可选参数，默认5毫秒</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-1-1-1" class="sphinx-tabs-panel" hidden="true" id="panel-1-1-1" name="1-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.todo">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AiBot.AndroidBotMain.todo" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id3">
<h2>图片与颜色<a class="headerlink" href="#id3" title="此标题的永久链接">#</a></h2>
<section id="savescreenshot">
<h3>截图保存 <code class="docutils literal notranslate"><span class="pre">saveScreenshot()</span></code><a class="headerlink" href="#savescreenshot" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-2-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-2-2-0" name="2-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-2-2-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-2-2-1" name="2-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-2-2-0" class="sphinx-tabs-panel" id="panel-2-2-0" name="2-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.saveScreenshot">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">saveScreenshot</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">savePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.saveScreenshot" title="永久链接至目标">#</a></dt>
<dd><p>截图保存</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>savePath</strong> (<em>string</em>) – 保存的位置</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> –</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-2-2-1" class="sphinx-tabs-panel" hidden="true" id="panel-2-2-1" name="2-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.save_screenshot">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">save_screenshot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.save_screenshot" title="永久链接至目标">#</a></dt>
<dd><p>保存截图，返回图片地址(手机中)或者 None</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>image_name</strong> – 图片名称，保存在手机 /storage/emulated/0/Android/data/com.aibot.client/files/ 路径下；</p></li>
<li><p><strong>region</strong> – 截图区域，默认全屏，<code class="docutils literal notranslate"><span class="pre">region</span> <span class="pre">=</span> <span class="pre">(起点x、起点y、终点x、终点y)</span></code>，得到一个矩形</p></li>
<li><p><strong>algorithm</strong> – <p>处理截图所用算法和参数，默认保存原图，</p>
<p><code class="docutils literal notranslate"><span class="pre">algorithm</span> <span class="pre">=</span> <span class="pre">(algorithm_type,</span> <span class="pre">threshold,</span> <span class="pre">max_val)</span></code></p>
<p>按元素顺序分别代表：</p>
<ol class="arabic simple" start="0">
<li><p><code class="docutils literal notranslate"><span class="pre">algorithm_type</span></code> 算法类型</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">threshold</span></code> 阈值</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">max_val</span></code> 最大值</p></li>
</ol>
<p><code class="docutils literal notranslate"><span class="pre">threshold</span></code> 和 <code class="docutils literal notranslate"><span class="pre">max_val</span></code> 同为 255 时灰度处理.</p>
<p><code class="docutils literal notranslate"><span class="pre">algorithm_type</span></code> 算法类型说明:</p>
<ol class="arabic simple" start="0">
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_BINARY</span></code>      算法，当前点值大于阈值 <cite>threshold</cite> 时，取最大值 <code class="docutils literal notranslate"><span class="pre">max_val</span></code>，否则设置为 0；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_BINARY_INV</span></code>  算法，当前点值大于阈值 <cite>threshold</cite> 时，设置为 0，否则设置为最大值 max_val；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TOZERO</span></code>      算法，当前点值大于阈值 <cite>threshold</cite> 时，不改变，否则设置为 0；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TOZERO_INV</span></code>  算法，当前点值大于阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code> 时，设置为 0，否则不改变；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TRUNC</span></code>       算法，当前点值大于阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code> 时，设置为阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code>，否则不改变；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ADAPTIVE_THRESH_MEAN_C</span></code>      算法，自适应阈值；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ADAPTIVE_THRESH_GAUSSIAN_C</span></code>  算法，自适应阈值；</p></li>
</ol>
</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>图片地址(手机中)或者 None</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="findimage">
<h3>找图 <code class="docutils literal notranslate"><span class="pre">findImage()</span></code><a class="headerlink" href="#findimage" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-3-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-3-3-0" name="3-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-3-3-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-3-3-1" name="3-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-3-3-0" class="sphinx-tabs-panel" id="panel-3-3-0" name="3-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.findImage">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">findImage</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">imagePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.findImage" title="永久链接至目标">#</a></dt>
<dd><p>找图</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>imagePath</strong> (<em>string</em>) – 小图片路径（手机）</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-3-3-1" class="sphinx-tabs-panel" hidden="true" id="panel-3-3-1" name="3-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.find_image">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">find_image</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">similarity</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.9</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.find_image" title="永久链接至目标">#</a></dt>
<dd><p>寻找图片坐标，在当前屏幕中寻找给定图片中心点的坐标，返回图片坐标或者 None</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>image_name</strong> – 图片名称（手机中）；</p></li>
<li><p><strong>region</strong> – 截图区域，默认全屏，<code class="docutils literal notranslate"><span class="pre">region</span> <span class="pre">=</span> <span class="pre">(起点x、起点y、终点x、终点y)</span></code>，得到一个矩形</p></li>
<li><p><strong>algorithm</strong> – <p>处理屏幕截图所用的算法，默认原图，注意：给定图片处理时所用的算法，应该和此方法的算法一致；</p>
<p><code class="docutils literal notranslate"><span class="pre">algorithm</span> <span class="pre">=</span> <span class="pre">(algorithm_type,</span> <span class="pre">threshold,</span> <span class="pre">max_val)</span></code></p>
<p>按元素顺序分别代表：</p>
<ol class="arabic simple" start="0">
<li><p><code class="docutils literal notranslate"><span class="pre">algorithm_type</span></code> 算法类型</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">threshold</span></code> 阈值</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">max_val</span></code> 最大值</p></li>
</ol>
<p><code class="docutils literal notranslate"><span class="pre">threshold</span></code> 和 <code class="docutils literal notranslate"><span class="pre">max_val</span></code> 同为 255 时灰度处理.</p>
<p><code class="docutils literal notranslate"><span class="pre">algorithm_type</span></code> 算法类型说明:</p>
<ol class="arabic simple" start="0">
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_BINARY</span></code>      算法，当前点值大于阈值 <cite>threshold</cite> 时，取最大值 <code class="docutils literal notranslate"><span class="pre">max_val</span></code>，否则设置为 0；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_BINARY_INV</span></code>  算法，当前点值大于阈值 <cite>threshold</cite> 时，设置为 0，否则设置为最大值 max_val；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TOZERO</span></code>      算法，当前点值大于阈值 <cite>threshold</cite> 时，不改变，否则设置为 0；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TOZERO_INV</span></code>  算法，当前点值大于阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code> 时，设置为 0，否则不改变；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">THRESH_TRUNC</span></code>       算法，当前点值大于阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code> 时，设置为阈值 <code class="docutils literal notranslate"><span class="pre">threshold</span></code>，否则不改变；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ADAPTIVE_THRESH_MEAN_C</span></code>      算法，自适应阈值；</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ADAPTIVE_THRESH_GAUSSIAN_C</span></code>  算法，自适应阈值；</p></li>
</ol>
</p></li>
<li><p><strong>similarity</strong> – 相似度，0-1 的浮点数，默认 0.9</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>图片坐标或者 None</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="findanimation">
<h3>找动态图 <code class="docutils literal notranslate"><span class="pre">findAnimation()</span></code><a class="headerlink" href="#findanimation" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-4-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-4-4-0" name="4-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-4-4-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-4-4-1" name="4-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-4-4-0" class="sphinx-tabs-panel" id="panel-4-4-0" name="4-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.findAnimation">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">findAnimation</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">frameRate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.findAnimation" title="永久链接至目标">#</a></dt>
<dd><p>找动态图</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frameRate</strong> (<em>number</em>) – 前后两张图相隔的时间，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-4-4-1" class="sphinx-tabs-panel" hidden="true" id="panel-4-4-1" name="4-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.find_dynamic_image">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">find_dynamic_image</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">interval_ti</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.find_dynamic_image" title="永久链接至目标">#</a></dt>
<dd><p>找动态图，对比同一张图在不同时刻是否发生变化，返回坐标列表</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>interval_ti</strong> – 前后时刻的间隔时间，单位毫秒；</p></li>
<li><p><strong>region</strong> – 截图区域，默认全屏，<code class="docutils literal notranslate"><span class="pre">region</span> <span class="pre">=</span> <span class="pre">(起点x、起点y、终点x、终点y)</span></code>，得到一个矩形</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>坐标列表</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getcolor">
<h3>获取颜色值 <code class="docutils literal notranslate"><span class="pre">getColor()</span></code><a class="headerlink" href="#getcolor" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-5-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-5-5-0" name="5-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-5-5-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-5-5-1" name="5-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-5-5-0" class="sphinx-tabs-panel" id="panel-5-5-0" name="5-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.findColor">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">findColor</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">strMainColor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.findColor" title="永久链接至目标">#</a></dt>
<dd><p>查找指定色值的坐标点</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>strMainColor</strong> (<em>string</em>) – #开头的色值</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;{x:number, y:number}&gt;</strong> – 成功返回{x:number, y:number} 失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-5-5-1" class="sphinx-tabs-panel" hidden="true" id="panel-5-5-1" name="5-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.find_color">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">find_color</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sub_colors</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">similarity</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.9</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.find_color" title="永久链接至目标">#</a></dt>
<dd><p>获取指定色值的坐标点，返回坐标或者 None</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>color</strong> – 颜色字符串，必须以 # 开头，例如：#008577；</p></li>
<li><p><strong>sub_colors</strong> – 辅助定位的其他颜色；</p></li>
<li><p><strong>region</strong> – 截图区域，默认全屏，<code class="docutils literal notranslate"><span class="pre">region</span> <span class="pre">=</span> <span class="pre">(起点x、起点y、终点x、终点y)</span></code>，得到一个矩形</p></li>
<li><p><strong>similarity</strong> – 相似度，0-1 的浮点数，默认 0.9；</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout；</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout；</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>坐标或者 None</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="comparecolor">
<h3>比色 <code class="docutils literal notranslate"><span class="pre">compareColor()</span></code><a class="headerlink" href="#comparecolor" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-6-6-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-6-6-0" name="6-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-6-6-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-6-6-1" name="6-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-6-6-0" class="sphinx-tabs-panel" id="panel-6-6-0" name="6-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.compareColor">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">compareColor</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mainX</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mainY</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">strMainColor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.compareColor" title="永久链接至目标">#</a></dt>
<dd><p>比较指定坐标点的颜色值</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mainX</strong> (<em>number</em>) – 主颜色所在的X坐标</p></li>
<li><p><strong>mainY</strong> (<em>number</em>) – 主颜色所在的Y坐标</p></li>
<li><p><strong>strMainColor</strong> (<em>string</em>) – #开头的色值</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-6-6-1" class="sphinx-tabs-panel" hidden="true" id="panel-6-6-1" name="6-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id0">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id0" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="findcolor">
<h3>找色 <code class="docutils literal notranslate"><span class="pre">findColor()</span></code><a class="headerlink" href="#findcolor" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-7-7-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-7-7-0" name="7-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-7-7-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-7-7-1" name="7-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-7-7-0" class="sphinx-tabs-panel" id="panel-7-7-0" name="7-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.findColor">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">findColor</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">strMainColor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.findColor" title="永久链接至目标">#</a></dt>
<dd><p>查找指定色值的坐标点</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>strMainColor</strong> (<em>string</em>) – #开头的色值</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;{x:number, y:number}&gt;</strong> – 成功返回{x:number, y:number} 失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-7-7-1" class="sphinx-tabs-panel" hidden="true" id="panel-7-7-1" name="7-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id4">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">find_color</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sub_colors</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">similarity</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.9</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#id4" title="永久链接至目标">#</a></dt>
<dd><p>获取指定色值的坐标点，返回坐标或者 None</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>color</strong> – 颜色字符串，必须以 # 开头，例如：#008577；</p></li>
<li><p><strong>sub_colors</strong> – 辅助定位的其他颜色；</p></li>
<li><p><strong>region</strong> – 截图区域，默认全屏，<code class="docutils literal notranslate"><span class="pre">region</span> <span class="pre">=</span> <span class="pre">(起点x、起点y、终点x、终点y)</span></code>，得到一个矩形</p></li>
<li><p><strong>similarity</strong> – 相似度，0-1 的浮点数，默认 0.9；</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout；</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout；</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>坐标或者 None</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="ocr">
<h2>OCR系统<a class="headerlink" href="#ocr" title="此标题的永久链接">#</a></h2>
<section id="findwords">
<h3>获取文字坐标 <code class="docutils literal notranslate"><span class="pre">findWords()</span></code><a class="headerlink" href="#findwords" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-8-8-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-8-8-0" name="8-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-8-8-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-8-8-1" name="8-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-8-8-0" class="sphinx-tabs-panel" id="panel-8-8-0" name="8-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.findWords">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">findWords</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">words</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.findWords" title="永久链接至目标">#</a></dt>
<dd><p>查找文字</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>words</strong> (<em>string</em>) – 要查找的文字</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-8-8-1" class="sphinx-tabs-panel" hidden="true" id="panel-8-8-1" name="8-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.find_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">find_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.find_text" title="永久链接至目标">#</a></dt>
<dd><p>查找文字所在的坐标，返回坐标列表（坐标是文本区域中心位置）</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> – 要查找的文字；</p></li>
<li><p><strong>region</strong> – 识别区域，默认全屏；</p></li>
<li><p><strong>algorithm</strong> – 处理图片/屏幕所用算法和参数，默认保存原图；</p></li>
<li><p><strong>scale</strong> – 图片缩放率，默认为 1.0，1.0 以下为缩小，1.0 以上为放大；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>坐标列表（坐标是文本区域中心位置）</p>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">参见</p>
<p><a class="reference internal" href="../../reference/py/api/AiBot.AndroidBotMain.find_image.html#AiBot.AndroidBotMain.find_image" title="AiBot.AndroidBotMain.find_image"><code class="xref py py-meth docutils literal notranslate"><span class="pre">find_image()</span></code></a>: <code class="docutils literal notranslate"><span class="pre">region</span></code> 和 <code class="docutils literal notranslate"><span class="pre">algorithm</span></code> 的参数说明</p>
</div>
</dd></dl>

</div></div>
</section>
<section id="getwords">
<h3>获取屏幕文字 <code class="docutils literal notranslate"><span class="pre">getWords()</span></code><a class="headerlink" href="#getwords" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-9-9-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-9-9-0" name="9-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-9-9-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-9-9-1" name="9-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-9-9-0" class="sphinx-tabs-panel" id="panel-9-9-0" name="9-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getWords">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getWords</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getWords" title="永久链接至目标">#</a></dt>
<dd><p>获取屏幕文字</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;string&gt;</strong> – 失败返回null，成功返回手机屏幕上的文字</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-9-9-1" class="sphinx-tabs-panel" hidden="true" id="panel-9-9-1" name="9-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_text" title="永久链接至目标">#</a></dt>
<dd><p>通过 OCR 识别屏幕中的文字，返回文字列表</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>region</strong> – 识别区域，默认全屏；</p></li>
<li><p><strong>algorithm</strong> – 处理图片/屏幕所用算法和参数，默认保存原图；</p></li>
<li><p><strong>scale</strong> – 图片缩放率，默认为 1.0，1.0 以下为缩小，1.0 以上为放大；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>文字列表</p>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">参见</p>
<p><a class="reference internal" href="../../reference/py/api/AiBot.AndroidBotMain.find_image.html#AiBot.AndroidBotMain.find_image" title="AiBot.AndroidBotMain.find_image"><code class="xref py py-meth docutils literal notranslate"><span class="pre">find_image()</span></code></a>: <code class="docutils literal notranslate"><span class="pre">region</span></code> 和 <code class="docutils literal notranslate"><span class="pre">algorithm</span></code> 的参数说明</p>
</div>
</dd></dl>

</div></div>
</section>
</section>
<section id="id5">
<h2>点击手势<a class="headerlink" href="#id5" title="此标题的永久链接">#</a></h2>
<section id="click">
<h3>单击 <code class="docutils literal notranslate"><span class="pre">click()</span></code><a class="headerlink" href="#click" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-10-10-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-10-10-0" name="10-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-10-10-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-10-10-1" name="10-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-10-10-0" class="sphinx-tabs-panel" id="panel-10-10-0" name="10-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.click">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">click</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.click" title="永久链接至目标">#</a></dt>
<dd><p>点击坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>number</em>) – 横坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 纵坐标</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-10-10-1" class="sphinx-tabs-panel" hidden="true" id="panel-10-10-1" name="10-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.click">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">click</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.click" title="永久链接至目标">#</a></dt>
<dd><p>点击坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>point</strong> – 坐标</p></li>
<li><p><strong>offset_x</strong> – 坐标 x 轴偏移量</p></li>
<li><p><strong>offset_y</strong> – 坐标 y 轴偏移量</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="doubleclick">
<h3>双击 <code class="docutils literal notranslate"><span class="pre">doubleClick()</span></code><a class="headerlink" href="#doubleclick" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-11-11-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-11-11-0" name="11-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-11-11-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-11-11-1" name="11-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-11-11-0" class="sphinx-tabs-panel" id="panel-11-11-0" name="11-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.doubleClick">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">doubleClick</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.doubleClick" title="永久链接至目标">#</a></dt>
<dd><p>双击坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>number</em>) – 横坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 纵坐标</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-11-11-1" class="sphinx-tabs-panel" hidden="true" id="panel-11-11-1" name="11-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.double_click">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">double_click</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.double_click" title="永久链接至目标">#</a></dt>
<dd><p>双击坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>point</strong> – 坐标</p></li>
<li><p><strong>offset_x</strong> – 坐标 x 轴偏移量</p></li>
<li><p><strong>offset_y</strong> – 坐标 y 轴偏移量</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="press">
<h3>按下 <code class="docutils literal notranslate"><span class="pre">press()</span></code><a class="headerlink" href="#press" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-12-12-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-12-12-0" name="12-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-12-12-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-12-12-1" name="12-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-12-12-0" class="sphinx-tabs-panel" id="panel-12-12-0" name="12-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.press">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">press</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.press" title="永久链接至目标">#</a></dt>
<dd><p>手指按下</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>number</em>) – 横坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 纵坐标</p></li>
<li><p><strong>duration</strong> (<em>number</em>) – 按下时长，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-12-12-1" class="sphinx-tabs-panel" hidden="true" id="panel-12-12-1" name="12-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id6">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id6" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="longclick">
<h3>长按 <code class="docutils literal notranslate"><span class="pre">longClick()</span></code><a class="headerlink" href="#longclick" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-13-13-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-13-13-0" name="13-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-13-13-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-13-13-1" name="13-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-13-13-0" class="sphinx-tabs-panel" id="panel-13-13-0" name="13-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.longClick">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">longClick</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.longClick" title="永久链接至目标">#</a></dt>
<dd><p>长按坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>number</em>) – 横坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 纵坐标</p></li>
<li><p><strong>duration</strong> (<em>number</em>) – 长按时长，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-13-13-1" class="sphinx-tabs-panel" hidden="true" id="panel-13-13-1" name="13-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.long_click">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">long_click</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset_y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.long_click" title="永久链接至目标">#</a></dt>
<dd><p>长按坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>point</strong> – 坐标</p></li>
<li><p><strong>duration</strong> – 按住时长，单位秒</p></li>
<li><p><strong>offset_x</strong> – 坐标 x 轴偏移量</p></li>
<li><p><strong>offset_y</strong> – 坐标 y 轴偏移量</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="release">
<h3>抬起 <code class="docutils literal notranslate"><span class="pre">release()</span></code><a class="headerlink" href="#release" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-14-14-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-14-14-0" name="14-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-14-14-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-14-14-1" name="14-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-14-14-0" class="sphinx-tabs-panel" id="panel-14-14-0" name="14-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.release">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">release</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.release" title="永久链接至目标">#</a></dt>
<dd><p>手指释放</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-14-14-1" class="sphinx-tabs-panel" hidden="true" id="panel-14-14-1" name="14-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id7">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id7" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="move">
<h3>移动 <code class="docutils literal notranslate"><span class="pre">move()</span></code><a class="headerlink" href="#move" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-15-15-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-15-15-0" name="15-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-15-15-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-15-15-1" name="15-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-15-15-0" class="sphinx-tabs-panel" id="panel-15-15-0" name="15-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.move">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">move</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.move" title="永久链接至目标">#</a></dt>
<dd><p>手指移动</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>number</em>) – 横坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 纵坐标</p></li>
<li><p><strong>duration</strong> (<em>number</em>) – 移动时长，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-15-15-1" class="sphinx-tabs-panel" hidden="true" id="panel-15-15-1" name="15-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.move">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">move</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.move" title="永久链接至目标">#</a></dt>
<dd><p>手指移动</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>point</strong> – 坐标</p></li>
<li><p><strong>duration</strong> – 持续时间</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="swipe">
<h3>滑动 <code class="docutils literal notranslate"><span class="pre">swipe()</span></code><a class="headerlink" href="#swipe" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-16-16-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-16-16-0" name="16-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-16-16-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-16-16-1" name="16-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-16-16-0" class="sphinx-tabs-panel" id="panel-16-16-0" name="16-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.swipe">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">swipe</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">startX</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">startY</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">endX</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">endY</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.swipe" title="永久链接至目标">#</a></dt>
<dd><p>滑动坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>startX</strong> (<em>number</em>) – 起始横坐标</p></li>
<li><p><strong>startY</strong> (<em>number</em>) – 起始纵坐标</p></li>
<li><p><strong>endX</strong> (<em>number</em>) – 结束横坐标</p></li>
<li><p><strong>endY</strong> (<em>number</em>) – 结束纵坐标</p></li>
<li><p><strong>duration</strong> (<em>number</em>) – 滑动时长，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-16-16-1" class="sphinx-tabs-panel" hidden="true" id="panel-16-16-1" name="16-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.swipe">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">swipe</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">start_point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end_point</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.swipe" title="永久链接至目标">#</a></dt>
<dd><p>滑动坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>start_point</strong> – 起始坐标</p></li>
<li><p><strong>end_point</strong> – 结束坐标</p></li>
<li><p><strong>duration</strong> – 滑动时长，单位秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="dispatchgesture">
<h3>执行手势 <code class="docutils literal notranslate"><span class="pre">dispatchGesture()</span></code><a class="headerlink" href="#dispatchgesture" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-17-17-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-17-17-0" name="17-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-17-17-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-17-17-1" name="17-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-17-17-0" class="sphinx-tabs-panel" id="panel-17-17-0" name="17-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.dispatchGesture">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">dispatchGesture</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gesturePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.dispatchGesture" title="永久链接至目标">#</a></dt>
<dd><p>执行手势</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>duration</strong> (<em>number</em>) – 手势时长，单位毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-17-17-1" class="sphinx-tabs-panel" hidden="true" id="panel-17-17-1" name="17-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.gesture">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">gesture</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gesture_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.gesture" title="永久链接至目标">#</a></dt>
<dd><p>执行手势</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>gesture_path</strong> – 手势路径，由一系列坐标点组成</p></li>
<li><p><strong>duration</strong> – 手势执行时长, 单位秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="dispatchgestures">
<h3>执行多个手势 <code class="docutils literal notranslate"><span class="pre">dispatchGestures()</span></code><a class="headerlink" href="#dispatchgestures" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-18-18-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-18-18-0" name="18-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-18-18-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-18-18-1" name="18-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-18-18-0" class="sphinx-tabs-panel" id="panel-18-18-0" name="18-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.dispatchGestures">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">dispatchGestures</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gesturesPath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.dispatchGestures" title="永久链接至目标">#</a></dt>
<dd><p>执行多个手势</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-18-18-1" class="sphinx-tabs-panel" hidden="true" id="panel-18-18-1" name="18-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id8">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id8" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="id9">
<h2>发送文本<a class="headerlink" href="#id9" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-19-19-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-19-19-0" name="19-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-19-19-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-19-19-1" name="19-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-19-19-0" class="sphinx-tabs-panel" id="panel-19-19-0" name="19-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.sendKeys">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">sendKeys</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.sendKeys" title="永久链接至目标">#</a></dt>
<dd><p>发送文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>string</em>) – 发送的文本，需要打开aibote输入法</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-19-19-1" class="sphinx-tabs-panel" hidden="true" id="panel-19-19-1" name="19-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.send_keys">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">send_keys</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.send_keys" title="永久链接至目标">#</a></dt>
<dd><p>发送文本，需要打开 AiBot 输入法</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>text</strong> – 文本内容</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id10">
<h2>发送按键<a class="headerlink" href="#id10" title="此标题的永久链接">#</a></h2>
<section id="back">
<h3>返回 <code class="docutils literal notranslate"><span class="pre">back()</span></code><a class="headerlink" href="#back" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-20-20-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-20-20-0" name="20-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-20-20-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-20-20-1" name="20-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-20-20-0" class="sphinx-tabs-panel" id="panel-20-20-0" name="20-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.back">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">back</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.back" title="永久链接至目标">#</a></dt>
<dd><p>返回</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-20-20-1" class="sphinx-tabs-panel" hidden="true" id="panel-20-20-1" name="20-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.back">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">back</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.back" title="永久链接至目标">#</a></dt>
<dd><p>返回</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="home">
<h3>返回桌面 <code class="docutils literal notranslate"><span class="pre">home()</span></code><a class="headerlink" href="#home" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-21-21-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-21-21-0" name="21-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-21-21-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-21-21-1" name="21-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-21-21-0" class="sphinx-tabs-panel" id="panel-21-21-0" name="21-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.home">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">home</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.home" title="永久链接至目标">#</a></dt>
<dd><p>home</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-21-21-1" class="sphinx-tabs-panel" hidden="true" id="panel-21-21-1" name="21-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.home">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">home</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.home" title="永久链接至目标">#</a></dt>
<dd><p>返回桌面</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="recents">
<h3>显示最近任务 <code class="docutils literal notranslate"><span class="pre">recents()</span></code><a class="headerlink" href="#recents" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-22-22-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-22-22-0" name="22-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-22-22-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-22-22-1" name="22-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-22-22-0" class="sphinx-tabs-panel" id="panel-22-22-0" name="22-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.recents">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">recents</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.recents" title="永久链接至目标">#</a></dt>
<dd><p>显示最近任务</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-22-22-1" class="sphinx-tabs-panel" hidden="true" id="panel-22-22-1" name="22-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.recent_tasks">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">recent_tasks</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.recent_tasks" title="永久链接至目标">#</a></dt>
<dd><p>显示最近任务</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="sendvk">
<h3>发送按键值 <code class="docutils literal notranslate"><span class="pre">sendVk()</span></code><a class="headerlink" href="#sendvk" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-23-23-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-23-23-0" name="23-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-23-23-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-23-23-1" name="23-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-23-23-0" class="sphinx-tabs-panel" id="panel-23-23-0" name="23-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.sendVk">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">sendVk</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">keyCode</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.sendVk" title="永久链接至目标">#</a></dt>
<dd><p>发送按键</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>keyCode</strong> (<em>number</em>) – 发送的虚拟按键，需要打开aibote输入法。例如：最近应用列表：187  回车：66 按键对照表 <a class="reference external" href="https://blog.csdn.net/yaoyaozaiye/article/details/122826340">https://blog.csdn.net/yaoyaozaiye/article/details/122826340</a></p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-23-23-1" class="sphinx-tabs-panel" hidden="true" id="panel-23-23-1" name="23-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.send_vk">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">send_vk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vk</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.send_vk" title="永久链接至目标">#</a></dt>
<dd><p>发送虚拟键值，需要打开 AiBot 输入法</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>vk</strong> – 虚拟键值</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
<p>虚拟键值按键对照表 <a class="reference external" href="https://blog.csdn.net/yaoyaozaiye/article/details/122826340">https://blog.csdn.net/yaoyaozaiye/article/details/122826340</a></p>
</dd></dl>

</div></div>
</section>
</section>
<section id="app">
<h2>启动APP<a class="headerlink" href="#app" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-24-24-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-24-24-0" name="24-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-24-24-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-24-24-1" name="24-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-24-24-0" class="sphinx-tabs-panel" id="panel-24-24-0" name="24-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.startApp">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">startApp</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.startApp" title="永久链接至目标">#</a></dt>
<dd><p>启动App</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>string</em>) – 包名或者app名称</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-24-24-1" class="sphinx-tabs-panel" hidden="true" id="panel-24-24-1" name="24-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.start_app">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">start_app</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.start_app" title="永久链接至目标">#</a></dt>
<dd><p>启动 APP</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> – APP名字或者包名</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id11">
<h2>屏幕大小<a class="headerlink" href="#id11" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-25-25-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-25-25-0" name="25-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-25-25-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-25-25-1" name="25-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-25-25-0" class="sphinx-tabs-panel" id="panel-25-25-0" name="25-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getWindowSize">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getWindowSize</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getWindowSize" title="永久链接至目标">#</a></dt>
<dd><p>屏幕大小</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;{width:number, height:number}&gt;</strong> – 成功返回{width:number, height:number}</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-25-25-1" class="sphinx-tabs-panel" hidden="true" id="panel-25-25-1" name="25-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_window_size">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_window_size</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_window_size" title="永久链接至目标">#</a></dt>
<dd><p>获取屏幕大小</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p>屏幕大小, 字典格式</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id12">
<h2>图片大小<a class="headerlink" href="#id12" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-26-26-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-26-26-0" name="26-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-26-26-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-26-26-1" name="26-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-26-26-0" class="sphinx-tabs-panel" id="panel-26-26-0" name="26-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getImageSize">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getImageSize</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">imagePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getImageSize" title="永久链接至目标">#</a></dt>
<dd><p>图片大小</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>imagePath</strong> (<em>string</em>) – 图片路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;{width:number, height:number}&gt;</strong> – 成功返回{width:number, height:number}</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-26-26-1" class="sphinx-tabs-panel" hidden="true" id="panel-26-26-1" name="26-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_image_size">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_image_size</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_path</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_image_size" title="永久链接至目标">#</a></dt>
<dd><p>获取图片大小</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>image_path</strong> – 图片路径</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>图片大小, 字典格式</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id">
<h2>获取安卓ID<a class="headerlink" href="#id" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-27-27-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-27-27-0" name="27-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-27-27-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-27-27-1" name="27-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-27-27-0" class="sphinx-tabs-panel" id="panel-27-27-0" name="27-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getAndroidId">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getAndroidId</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getAndroidId" title="永久链接至目标">#</a></dt>
<dd><p>获取安卓ID</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回安卓手机ID</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-27-27-1" class="sphinx-tabs-panel" hidden="true" id="panel-27-27-1" name="27-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_android_id">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_android_id</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_android_id" title="永久链接至目标">#</a></dt>
<dd><p>获取 Android 设备 ID
:return: Android 设备 ID 字符串</p>
</dd></dl>

</div></div>
</section>
<section id="url">
<h2>URL请求<a class="headerlink" href="#url" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-28-28-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-28-28-0" name="28-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-28-28-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-28-28-1" name="28-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-28-28-0" class="sphinx-tabs-panel" id="panel-28-28-0" name="28-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.urlRequest">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">urlRequest</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">requestType</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">contentType=&quot;null&quot;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">postData=&quot;null&quot;</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.urlRequest" title="永久链接至目标">#</a></dt>
<dd><p>URL请求</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>url</strong> (<em>string</em>) – 请求的地址 <a class="reference external" href="http://www.ai-bot.net">http://www.ai-bot.net</a></p></li>
<li><p><strong>requestType</strong> (<em>string</em>) – 请求类型，GET或者POST</p></li>
<li><p><strong>contentType</strong> (<em>string</em>) – 可选参数，用作POST 内容类型</p></li>
<li><p><strong>postData</strong> (<em>string</em>) – 可选参数，用作POST 提交的数据</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;string&gt;</strong> – 返回请求数据内容</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-28-28-1" class="sphinx-tabs-panel" hidden="true" id="panel-28-28-1" name="28-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id13">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id13" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="toast">
<h2>Toast消息提示<a class="headerlink" href="#toast" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-29-29-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-29-29-0" name="29-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-29-29-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-29-29-1" name="29-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-29-29-0" class="sphinx-tabs-panel" id="panel-29-29-0" name="29-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.showToast">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">showToast</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.showToast" title="永久链接至目标">#</a></dt>
<dd><p>Toast消息提示</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>string</em>) – 提示的文本</p></li>
<li><p><strong>duration</strong> (<em>number</em>) – 显示时长，最大时长3500毫秒</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 返回true</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-29-29-1" class="sphinx-tabs-panel" hidden="true" id="panel-29-29-1" name="29-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.show_toast">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">show_toast</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.show_toast" title="永久链接至目标">#</a></dt>
<dd><p>Toast 弹窗</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>text</strong> – 弹窗内容</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id14">
<h2>验证码系统<a class="headerlink" href="#id14" title="此标题的永久链接">#</a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-30-30-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-30-30-0" name="30-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-30-30-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-30-30-1" name="30-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-30-30-0" class="sphinx-tabs-panel" id="panel-30-30-0" name="30-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getCaptcha">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getCaptcha</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">password</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">softId</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">codeType</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lenMin=&quot;0&quot;</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getCaptcha" title="永久链接至目标">#</a></dt>
<dd><p>识别验证码</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filePath</strong> (<em>string</em>) – 图片文件路径</p></li>
<li><p><strong>username</strong> (<em>string</em>) – 用户名</p></li>
<li><p><strong>password</strong> (<em>string</em>) – 密码</p></li>
<li><p><strong>softId</strong> (<em>string</em>) – 软件ID</p></li>
<li><p><strong>codeType</strong> (<em>string</em>) – 图片类型 参考https://www.chaojiying.com/price.html</p></li>
<li><p><strong>lenMin</strong> (<em>string</em>) – 最小位数 默认0为不启用,图片类型为可变位长时可启用这个参数</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;{err_no:number, err_str:string, pic_id:string, pic_str:string, md5:string}&gt;</strong> – 返回JSON err_no,(数值) 返回代码  为0 表示正常，错误代码 参考https://www.chaojiying.com/api-23.html err_str,(字符串) 中文描述的返回信息 pic_id,(字符串) 图片标识号，或图片id号 pic_str,(字符串) 识别出的结果 md5,(字符串) md5校验值,用来校验此条数据返回是否真实有效</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-30-30-1" class="sphinx-tabs-panel" hidden="true" id="panel-30-30-1" name="30-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="id15">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">todo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#id15" title="永久链接至目标">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="id16">
<h2>元素操作<a class="headerlink" href="#id16" title="此标题的永久链接">#</a></h2>
<div class="admonition note">
<p class="admonition-title">备注</p>
<p>文本、描述xpath 支持 &#64;containsText 和 &#64;containsDesc 模糊定位</p>
</div>
<section id="clickelement">
<h3>点击元素 <code class="docutils literal notranslate"><span class="pre">clickElement()</span></code><a class="headerlink" href="#clickelement" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-31-31-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-31-31-0" name="31-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-31-31-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-31-31-1" name="31-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-31-31-0" class="sphinx-tabs-panel" id="panel-31-31-0" name="31-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.clickElement">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">clickElement</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.clickElement" title="永久链接至目标">#</a></dt>
<dd><p>点击元素</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-31-31-1" class="sphinx-tabs-panel" hidden="true" id="panel-31-31-1" name="31-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.click_element">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">click_element</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.click_element" title="永久链接至目标">#</a></dt>
<dd><p>点击元素</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – </p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="clickelementbyslide">
<h3>滑动并点击元素 <code class="docutils literal notranslate"><span class="pre">clickElementBySlide()</span></code><a class="headerlink" href="#clickelementbyslide" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-32-32-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-32-32-0" name="32-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-32-32-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-32-32-1" name="32-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-32-32-0" class="sphinx-tabs-panel" id="panel-32-32-0" name="32-0" role="tabpanel" tabindex="0"><p>todo</p>
</div><div aria-labelledby="tab-32-32-1" class="sphinx-tabs-panel" hidden="true" id="panel-32-32-1" name="32-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.click_element_by_slide">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">click_element_by_slide</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">distance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">direction</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">999</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end_flag_xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">600</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.click_element_by_slide" title="永久链接至目标">#</a></dt>
<dd><p>滑动列表，查找并点击指定元素</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath路径</p></li>
<li><p><strong>distance</strong> – 滑动距离，默认 1000</p></li>
<li><p><strong>duration</strong> – 滑动时间，默认 0.5 秒</p></li>
<li><p><strong>direction</strong> – 滑动方向，默认为 1； 1=上滑，2=下滑</p></li>
<li><p><strong>count</strong> – 滑动次数</p></li>
<li><p><strong>end_flag_xpath</strong> – 结束标志 xpath</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认 10 分钟</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认 0.5 秒</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="clickanyelements">
<h3>遍历点击元素 <code class="docutils literal notranslate"><span class="pre">clickAnyElements</span></code><a class="headerlink" href="#clickanyelements" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-33-33-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-33-33-0" name="33-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-33-33-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-33-33-1" name="33-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-33-33-0" class="sphinx-tabs-panel" id="panel-33-33-0" name="33-0" role="tabpanel" tabindex="0"><p>todo</p>
</div><div aria-labelledby="tab-33-33-1" class="sphinx-tabs-panel" hidden="true" id="panel-33-33-1" name="33-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.click_any_elements">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">click_any_elements</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.click_any_elements" title="永久链接至目标">#</a></dt>
<dd><p>遍历点击列表中的元素，直到任意一个元素返回 True</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath_list</strong> – xpath 列表</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getelementtext">
<h3>获取元素文本 <code class="docutils literal notranslate"><span class="pre">getElementText()</span></code><a class="headerlink" href="#getelementtext" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-34-34-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-34-34-0" name="34-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-34-34-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-34-34-1" name="34-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-34-34-0" class="sphinx-tabs-panel" id="panel-34-34-0" name="34-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getElementText">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getElementText</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getElementText" title="永久链接至目标">#</a></dt>
<dd><p>获取元素文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回元素内容，失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-34-34-1" class="sphinx-tabs-panel" hidden="true" id="panel-34-34-1" name="34-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_element_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_element_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_element_text" title="永久链接至目标">#</a></dt>
<dd><p>获取元素文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>元素文本</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="setelementtext">
<h3>设置文本 <code class="docutils literal notranslate"><span class="pre">setElementText</span></code><a class="headerlink" href="#setelementtext" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-35-35-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-35-35-0" name="35-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-35-35-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-35-35-1" name="35-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-35-35-0" class="sphinx-tabs-panel" id="panel-35-35-0" name="35-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.setElementText">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">setElementText</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.setElementText" title="永久链接至目标">#</a></dt>
<dd><p>设置元素文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
<li><p><strong>text</strong> (<em>string</em>) – 设置的文本</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-35-35-1" class="sphinx-tabs-panel" hidden="true" id="panel-35-35-1" name="35-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.set_element_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">set_element_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.set_element_text" title="永久链接至目标">#</a></dt>
<dd><p>设置元素文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – </p></li>
<li><p><strong>text</strong> – </p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getelementdescription">
<h3>获取元素描述 <code class="docutils literal notranslate"><span class="pre">getElementDescription()</span></code><a class="headerlink" href="#getelementdescription" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-36-36-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-36-36-0" name="36-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-36-36-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-36-36-1" name="36-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-36-36-0" class="sphinx-tabs-panel" id="panel-36-36-0" name="36-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getElementDescription">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getElementDescription</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getElementDescription" title="永久链接至目标">#</a></dt>
<dd><p>获取元素描述</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回元素内容，失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-36-36-1" class="sphinx-tabs-panel" hidden="true" id="panel-36-36-1" name="36-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_element_desc">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_element_desc</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_element_desc" title="永久链接至目标">#</a></dt>
<dd><p>获取元素描述</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>元素描述字符串</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getelementrect">
<h3>获取元素矩形位置 <code class="docutils literal notranslate"><span class="pre">getElementRect()</span></code><a class="headerlink" href="#getelementrect" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-37-37-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-37-37-0" name="37-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-37-37-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-37-37-1" name="37-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-37-37-0" class="sphinx-tabs-panel" id="panel-37-37-0" name="37-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getElementRect">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getElementRect</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getElementRect" title="永久链接至目标">#</a></dt>
<dd><p>获取元素位置</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;{left:number, top:number, right:number, bottom:number}&gt;</strong> – 成功返回元素位置，失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-37-37-1" class="sphinx-tabs-panel" hidden="true" id="panel-37-37-1" name="37-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_element_rect">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_element_rect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_err</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Point</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Point</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_element_rect" title="永久链接至目标">#</a></dt>
<dd><p>获取元素位置，返回元素区域左上角和右下角坐标</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
<li><p><strong>raise_err</strong> – 超时是否抛出异常；</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>元素区域左上角和右下角坐标</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="existselement">
<h3>判断元素是否存在 <code class="docutils literal notranslate"><span class="pre">existsElement()</span></code><a class="headerlink" href="#existselement" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-38-38-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-38-38-0" name="38-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-38-38-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-38-38-1" name="38-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-38-38-0" class="sphinx-tabs-panel" id="panel-38-38-0" name="38-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.existsElement">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">existsElement</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.existsElement" title="永久链接至目标">#</a></dt>
<dd><p>判断元素是否存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-38-38-1" class="sphinx-tabs-panel" hidden="true" id="panel-38-38-1" name="38-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.element_exists">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">element_exists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.element_exists" title="永久链接至目标">#</a></dt>
<dd><p>元素是否存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="elementnotexists">
<h3>元素是否不存在 <code class="docutils literal notranslate"><span class="pre">elementNotExists()</span></code><a class="headerlink" href="#elementnotexists" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-39-39-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-39-39-0" name="39-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-39-39-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-39-39-1" name="39-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-39-39-0" class="sphinx-tabs-panel" id="panel-39-39-0" name="39-0" role="tabpanel" tabindex="0"><p>todo</p>
</div><div aria-labelledby="tab-39-39-1" class="sphinx-tabs-panel" hidden="true" id="panel-39-39-1" name="39-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.element_not_exists">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">element_not_exists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.element_not_exists" title="永久链接至目标">#</a></dt>
<dd><p>元素是否不存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="anyelementsexists">
<h3>判断任意是否元素存在 <code class="docutils literal notranslate"><span class="pre">anyElementsExists()</span></code><a class="headerlink" href="#anyelementsexists" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-40-40-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-40-40-0" name="40-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-40-40-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-40-40-1" name="40-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-40-40-0" class="sphinx-tabs-panel" id="panel-40-40-0" name="40-0" role="tabpanel" tabindex="0"><p>todo</p>
</div><div aria-labelledby="tab-40-40-1" class="sphinx-tabs-panel" hidden="true" id="panel-40-40-1" name="40-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.any_elements_exists">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">any_elements_exists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wait_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.any_elements_exists" title="永久链接至目标">#</a></dt>
<dd><p>遍历列表中的元素，只要任意一个元素存在就返回 True</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath_list</strong> – xpath 列表</p></li>
<li><p><strong>wait_time</strong> – 等待时间，默认取 self.wait_timeout</p></li>
<li><p><strong>interval_time</strong> – 轮询间隔时间，默认取 self.interval_timeout</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p>任意一个元素存在就返回 True</p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="isselectedelement">
<h3>判断元素是否选中 <code class="docutils literal notranslate"><span class="pre">isSelectedElement()</span></code><a class="headerlink" href="#isselectedelement" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-41-41-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-41-41-0" name="41-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-41-41-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-41-41-1" name="41-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-41-41-0" class="sphinx-tabs-panel" id="panel-41-41-0" name="41-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.isSelectedElement">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSelectedElement</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.isSelectedElement" title="永久链接至目标">#</a></dt>
<dd><p>判断元素是否选中</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-41-41-1" class="sphinx-tabs-panel" hidden="true" id="panel-41-41-1" name="41-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.element_is_selected">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">element_is_selected</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.element_is_selected" title="永久链接至目标">#</a></dt>
<dd><p>元素是否存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>xpath</strong> – xpath 路径</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="scrollelement">
<h3>滚动元素 <code class="docutils literal notranslate"><span class="pre">scrollElement()</span></code><a class="headerlink" href="#scrollelement" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-42-42-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-42-42-0" name="42-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-42-42-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-42-42-1" name="42-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-42-42-0" class="sphinx-tabs-panel" id="panel-42-42-0" name="42-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.scrollElement">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">scrollElement</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">direction</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.scrollElement" title="永久链接至目标">#</a></dt>
<dd><p>滚动元素</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> (<em>string</em>) – 元素路径</p></li>
<li><p><strong>direction</strong> (<em>number</em>) – 0 向前滑动， 1 向后滑动</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-42-42-1" class="sphinx-tabs-panel" hidden="true" id="panel-42-42-1" name="42-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.scroll_element">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">scroll_element</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">direction</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.scroll_element" title="永久链接至目标">#</a></dt>
<dd><p>滚动元素，0 向上滑动，1 向下滑动</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xpath</strong> – xpath 路径</p></li>
<li><p><strong>direction</strong> – 滚动方向，0 向上滑动，1 向下滑动</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="id17">
<h2>文件传输<a class="headerlink" href="#id17" title="此标题的永久链接">#</a></h2>
<section id="pushfile">
<h3>上传文件到手机 <code class="docutils literal notranslate"><span class="pre">pushFile()</span></code><a class="headerlink" href="#pushfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-43-43-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-43-43-0" name="43-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-43-43-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-43-43-1" name="43-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-43-43-0" class="sphinx-tabs-panel" id="panel-43-43-0" name="43-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.pushFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">pushFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">windowsFilePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.pushFile" title="永久链接至目标">#</a></dt>
<dd><p>上传文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>windowsFilePath</strong> (<em>string</em>) – 电脑文件路径，注意电脑路径 “\”转义问题</p></li>
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件保存路径, 安卓外部存储根目录 /storage/emulated/0/</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true 失败返回false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-43-43-1" class="sphinx-tabs-panel" hidden="true" id="panel-43-43-1" name="43-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.push_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">push_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">origin_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">to_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.push_file" title="永久链接至目标">#</a></dt>
<dd><p>将电脑文件传输到手机端</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>origin_path</strong> – 源文件路径</p></li>
<li><p><strong>to_path</strong> – 目标存储路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
<p>ex:
origin_path: /
to_path: /storage/emulated/0/Android/data/com.aibot.client/files/code479259.png</p>
</dd></dl>

</div></div>
</section>
<section id="pullfile">
<h3>拉取文件到电脑 <code class="docutils literal notranslate"><span class="pre">pullFile()</span></code><a class="headerlink" href="#pullfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-44-44-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-44-44-0" name="44-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-44-44-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-44-44-1" name="44-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-44-44-0" class="sphinx-tabs-panel" id="panel-44-44-0" name="44-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.pullFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">pullFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windowsFilePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.pullFile" title="永久链接至目标">#</a></dt>
<dd><p>拉取文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件路径，安卓外部存储根目录 /storage/emulated/0/</p></li>
<li><p><strong>windowsFilePath</strong> (<em>string</em>) – 电脑文件保存路径，注意电脑路径 “\”转义问题</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;void&gt;</strong> –</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-44-44-1" class="sphinx-tabs-panel" hidden="true" id="panel-44-44-1" name="44-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.pull_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">pull_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">remote_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">local_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.pull_file" title="永久链接至目标">#</a></dt>
<dd><p>将手机文件传输到电脑端</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>remote_path</strong> – 手机端文件路径</p></li>
<li><p><strong>local_path</strong> – 电脑本地文件存储路径</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
<p>ex:
remote_path: /storage/emulated/0/Android/data/com.aibot.client/files/code479259.png
local_path: /</p>
</dd></dl>

</div></div>
</section>
</section>
<section id="id18">
<h2>安卓文件操作<a class="headerlink" href="#id18" title="此标题的永久链接">#</a></h2>
<section id="writeandroidfile">
<h3>写入安卓文件 <code class="docutils literal notranslate"><span class="pre">writeAndroidFile()</span></code><a class="headerlink" href="#writeandroidfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-45-45-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-45-45-0" name="45-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-45-45-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-45-45-1" name="45-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-45-45-0" class="sphinx-tabs-panel" id="panel-45-45-0" name="45-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.writeAndroidFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">writeAndroidFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">isAppend=false</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.writeAndroidFile" title="永久链接至目标">#</a></dt>
<dd><p>写入安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件路径，安卓外部存储根目录 /storage/emulated/0/</p></li>
<li><p><strong>text</strong> (<em>string</em>) – 写入的内容</p></li>
<li><p><strong>isAppend</strong> (<em>boolean</em>) – 可选参数，是否追加，默认覆盖文件内容</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-45-45-1" class="sphinx-tabs-panel" hidden="true" id="panel-45-45-1" name="45-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.write_android_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">write_android_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">remote_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">append</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.write_android_file" title="永久链接至目标">#</a></dt>
<dd><p>写入安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>remote_path</strong> – 安卓文件路径</p></li>
<li><p><strong>text</strong> – 要写入的文本内容</p></li>
<li><p><strong>append</strong> – 是否追加模式</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="readandroidfile">
<h3>读取安卓文件 <code class="docutils literal notranslate"><span class="pre">readAndroidFile()</span></code><a class="headerlink" href="#readandroidfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-46-46-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-46-46-0" name="46-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-46-46-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-46-46-1" name="46-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-46-46-0" class="sphinx-tabs-panel" id="panel-46-46-0" name="46-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.readAndroidFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">readAndroidFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.readAndroidFile" title="永久链接至目标">#</a></dt>
<dd><p>读取安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件路径，安卓外部存储根目录 /storage/emulated/0/</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回文件内容，失败返回 null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-46-46-1" class="sphinx-tabs-panel" hidden="true" id="panel-46-46-1" name="46-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.read_android_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">read_android_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">remote_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.read_android_file" title="永久链接至目标">#</a></dt>
<dd><p>读取安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>remote_path</strong> – 安卓文件路径</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="deleteandroidfile">
<h3>删除安卓文件 <code class="docutils literal notranslate"><span class="pre">deleteAndroidFile()</span></code><a class="headerlink" href="#deleteandroidfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-47-47-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-47-47-0" name="47-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-47-47-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-47-47-1" name="47-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-47-47-0" class="sphinx-tabs-panel" id="panel-47-47-0" name="47-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.deleteAndroidFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">deleteAndroidFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.deleteAndroidFile" title="永久链接至目标">#</a></dt>
<dd><p>删除安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件路径，安卓外部存储根目录 /storage/emulated/0/</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-47-47-1" class="sphinx-tabs-panel" hidden="true" id="panel-47-47-1" name="47-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.delete_android_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">delete_android_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">remote_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.delete_android_file" title="永久链接至目标">#</a></dt>
<dd><p>删除安卓文件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>remote_path</strong> – 安卓文件路径</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="existsandroidfile">
<h3>判断文件是否存在 <code class="docutils literal notranslate"><span class="pre">existsAndroidFile()</span></code><a class="headerlink" href="#existsandroidfile" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-48-48-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-48-48-0" name="48-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-48-48-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-48-48-1" name="48-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-48-48-0" class="sphinx-tabs-panel" id="panel-48-48-0" name="48-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.existsAndroidFile">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">existsAndroidFile</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">androidFilePath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.existsAndroidFile" title="永久链接至目标">#</a></dt>
<dd><p>判断文件是否存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>androidFilePath</strong> (<em>string</em>) – 安卓文件路径，安卓外部存储根目录 /storage/emulated/0/</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-48-48-1" class="sphinx-tabs-panel" hidden="true" id="panel-48-48-1" name="48-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.exists_android_file">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">exists_android_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">remote_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.exists_android_file" title="永久链接至目标">#</a></dt>
<dd><p>安卓文件是否存在</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>remote_path</strong> – 安卓文件路径</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="intent">
<h2>Intent跳转<a class="headerlink" href="#intent" title="此标题的永久链接">#</a></h2>
<section id="uri-openuri">
<h3>跳转uri <code class="docutils literal notranslate"><span class="pre">openUri()</span></code><a class="headerlink" href="#uri-openuri" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-49-49-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-49-49-0" name="49-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-49-49-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-49-49-1" name="49-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-49-49-0" class="sphinx-tabs-panel" id="panel-49-49-0" name="49-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.openUri">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">openUri</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">uri</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.openUri" title="永久链接至目标">#</a></dt>
<dd><p>跳转uri</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>uri</strong> (<em>string</em>) – 跳转链接，例如：打开支付宝扫一扫界面，”alipayqr://platformapi/startapp?saId=10000007”</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-49-49-1" class="sphinx-tabs-panel" hidden="true" id="panel-49-49-1" name="49-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.open_uri">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">open_uri</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">uri</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.open_uri" title="永久链接至目标">#</a></dt>
<dd><p>唤起 app</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>uri</strong> – app 唤醒协议</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
<p>open_uri(“alipayqr://platformapi/startapp?saId=10000007”)</p>
</dd></dl>

</div></div>
</section>
<section id="callphone">
<h3>拨打电话 <code class="docutils literal notranslate"><span class="pre">callPhone()</span></code><a class="headerlink" href="#callphone" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-50-50-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-50-50-0" name="50-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-50-50-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-50-50-1" name="50-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-50-50-0" class="sphinx-tabs-panel" id="panel-50-50-0" name="50-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.callPhone">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">callPhone</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">phoneNumber</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.callPhone" title="永久链接至目标">#</a></dt>
<dd><p>拨打电话</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phoneNumber</strong> (<em>string</em>) – 拨打的电话号码</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-50-50-1" class="sphinx-tabs-panel" hidden="true" id="panel-50-50-1" name="50-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.call_phone">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">call_phone</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mobile</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.call_phone" title="永久链接至目标">#</a></dt>
<dd><p>拨打电话</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>mobile</strong> – 手机号码</p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="sendmsg">
<h3>发送短信 <code class="docutils literal notranslate"><span class="pre">sendMsg()</span></code><a class="headerlink" href="#sendmsg" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-51-51-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-51-51-0" name="51-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-51-51-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-51-51-1" name="51-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-51-51-0" class="sphinx-tabs-panel" id="panel-51-51-0" name="51-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.sendMsg">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">sendMsg</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">phoneNumber</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.sendMsg" title="永久链接至目标">#</a></dt>
<dd><p>发送短信</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phoneNumber</strong> (<em>string</em>) – 发送的电话号码</p></li>
<li><p><strong>message</strong> (<em>string</em>) – 短信内容</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-51-51-1" class="sphinx-tabs-panel" hidden="true" id="panel-51-51-1" name="51-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.send_msg">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">send_msg</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mobile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.send_msg" title="永久链接至目标">#</a></dt>
<dd><p>发送短信</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mobile</strong> – 手机号码</p></li>
<li><p><strong>text</strong> – 短信内容</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="id19">
<h2>获取包名/窗口<a class="headerlink" href="#id19" title="此标题的永久链接">#</a></h2>
<section id="activity-getactivity">
<h3>返回当前activity <code class="docutils literal notranslate"><span class="pre">getActivity()</span></code><a class="headerlink" href="#activity-getactivity" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-52-52-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-52-52-0" name="52-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-52-52-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-52-52-1" name="52-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-52-52-0" class="sphinx-tabs-panel" id="panel-52-52-0" name="52-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getActivity">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getActivity</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getActivity" title="永久链接至目标">#</a></dt>
<dd><p>获取当前活动窗口(Activity)</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回当前activity</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-52-52-1" class="sphinx-tabs-panel" hidden="true" id="panel-52-52-1" name="52-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_activity">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_activity</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_activity" title="永久链接至目标">#</a></dt>
<dd><p>获取活动页</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="package-getpackage">
<h3>返回当前package <code class="docutils literal notranslate"><span class="pre">getPackage()</span></code><a class="headerlink" href="#package-getpackage" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-53-53-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-53-53-0" name="53-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-53-53-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-53-53-1" name="53-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-53-53-0" class="sphinx-tabs-panel" id="panel-53-53-0" name="53-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getPackage">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getPackage</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getPackage" title="永久链接至目标">#</a></dt>
<dd><p>获取当前活动包名(Package)</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;string&gt;</strong> – 成功返回当前包名</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-53-53-1" class="sphinx-tabs-panel" hidden="true" id="panel-53-53-1" name="53-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_package">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_package</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_package" title="永久链接至目标">#</a></dt>
<dd><p>获取包名</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="id20">
<h2>安卓剪切板<a class="headerlink" href="#id20" title="此标题的永久链接">#</a></h2>
<section id="setclipboardtext">
<h3>设置剪切板内容 <code class="docutils literal notranslate"><span class="pre">setClipboardText()</span></code><a class="headerlink" href="#setclipboardtext" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-54-54-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-54-54-0" name="54-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-54-54-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-54-54-1" name="54-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-54-54-0" class="sphinx-tabs-panel" id="panel-54-54-0" name="54-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.setClipboardText">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">setClipboardText</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.setClipboardText" title="永久链接至目标">#</a></dt>
<dd><p>设置剪切板文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>string</em>) – 设置的文本</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-54-54-1" class="sphinx-tabs-panel" hidden="true" id="panel-54-54-1" name="54-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.set_clipboard_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">set_clipboard_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.set_clipboard_text" title="永久链接至目标">#</a></dt>
<dd><p>设置剪切板文本</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>text</strong> – </p>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getclipboardtext">
<h3>获取剪切板内容 <code class="docutils literal notranslate"><span class="pre">getClipboardText()</span></code><a class="headerlink" href="#getclipboardtext" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-55-55-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-55-55-0" name="55-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-55-55-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-55-55-1" name="55-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-55-55-0" class="sphinx-tabs-panel" id="panel-55-55-0" name="55-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getClipboardText">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getClipboardText</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getClipboardText" title="永久链接至目标">#</a></dt>
<dd><p>获取剪切板文本</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;string&gt;</strong> – 需要打开aibote输入法。成功返回剪切板文本，失败返回null</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-55-55-1" class="sphinx-tabs-panel" hidden="true" id="panel-55-55-1" name="55-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_clipboard_text">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_clipboard_text</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_clipboard_text" title="永久链接至目标">#</a></dt>
<dd><p>获取剪切板内容</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
<section id="id21">
<h2>创建脚本控件<a class="headerlink" href="#id21" title="此标题的永久链接">#</a></h2>
<section id="textview-createtextview">
<h3>创建TextView控件 <code class="docutils literal notranslate"><span class="pre">createTextView()</span></code><a class="headerlink" href="#textview-createtextview" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-56-56-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-56-56-0" name="56-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-56-56-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-56-56-1" name="56-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-56-56-0" class="sphinx-tabs-panel" id="panel-56-56-0" name="56-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.createTextView">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">createTextView</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.createTextView" title="永久链接至目标">#</a></dt>
<dd><p>创建TextView控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>id</strong> (<em>number</em>) – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>text</strong> (<em>string</em>) – 控件文本</p></li>
<li><p><strong>x</strong> (<em>number</em>) – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> (<em>number</em>) – 控件宽度</p></li>
<li><p><strong>height</strong> (<em>number</em>) – 控件高度</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-56-56-1" class="sphinx-tabs-panel" hidden="true" id="panel-56-56-1" name="56-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.create_text_view">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">create_text_view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">400</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">60</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AiBot.AndroidBotMain.create_text_view" title="永久链接至目标">#</a></dt>
<dd><p>创建文本框控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>_id</strong> – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>text</strong> – 控件文本</p></li>
<li><p><strong>x</strong> – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> – 控件宽度，默认 400</p></li>
<li><p><strong>height</strong> – 控件高度，默认 60</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="edittext-createedittext">
<h3>创建EditText控件 <code class="docutils literal notranslate"><span class="pre">createEditText()</span></code><a class="headerlink" href="#edittext-createedittext" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-57-57-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-57-57-0" name="57-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-57-57-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-57-57-1" name="57-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-57-57-0" class="sphinx-tabs-panel" id="panel-57-57-0" name="57-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.createEditText">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">createEditText</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hintText</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.createEditText" title="永久链接至目标">#</a></dt>
<dd><p>创建EditText控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>id</strong> (<em>number</em>) – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>hintText</strong> (<em>string</em>) – 提示文本</p></li>
<li><p><strong>x</strong> (<em>number</em>) – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> (<em>number</em>) – 控件宽度</p></li>
<li><p><strong>height</strong> (<em>number</em>) – 控件高度</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-57-57-1" class="sphinx-tabs-panel" hidden="true" id="panel-57-57-1" name="57-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.create_edit_view">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">create_edit_view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">400</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">150</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AiBot.AndroidBotMain.create_edit_view" title="永久链接至目标">#</a></dt>
<dd><p>创建编辑框控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>_id</strong> – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>text</strong> – 控件文本</p></li>
<li><p><strong>x</strong> – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> – 控件宽度，默认 400</p></li>
<li><p><strong>height</strong> – 控件高度，默认 150</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="checkbox-createcheckbox">
<h3>创建CheckBox控件 <code class="docutils literal notranslate"><span class="pre">createCheckBox()</span></code><a class="headerlink" href="#checkbox-createcheckbox" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-58-58-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-58-58-0" name="58-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-58-58-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-58-58-1" name="58-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-58-58-0" class="sphinx-tabs-panel" id="panel-58-58-0" name="58-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.createCheckBox">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">createCheckBox</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.createCheckBox" title="永久链接至目标">#</a></dt>
<dd><p>创建CheckBox控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>id</strong> (<em>number</em>) – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>text</strong> (<em>string</em>) – 控件文本</p></li>
<li><p><strong>x</strong> (<em>number</em>) – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> (<em>number</em>) – 控件宽度</p></li>
<li><p><strong>height</strong> (<em>number</em>) – 控件高度</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-58-58-1" class="sphinx-tabs-panel" hidden="true" id="panel-58-58-1" name="58-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.create_check_box">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">create_check_box</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">400</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">60</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AiBot.AndroidBotMain.create_check_box" title="永久链接至目标">#</a></dt>
<dd><p>创建复选框控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>_id</strong> – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>text</strong> – 控件文本</p></li>
<li><p><strong>x</strong> – 控件在屏幕上x坐标</p></li>
<li><p><strong>y</strong> – 控件在屏幕上y坐标</p></li>
<li><p><strong>width</strong> – 控件宽度，默认 400</p></li>
<li><p><strong>height</strong> – 控件高度，默认 60</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="webview-createwebview">
<h3>创建WebView控件 <code class="docutils literal notranslate"><span class="pre">createWebView()</span></code><a class="headerlink" href="#webview-createwebview" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-59-59-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-59-59-0" name="59-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-59-59-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-59-59-1" name="59-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-59-59-0" class="sphinx-tabs-panel" id="panel-59-59-0" name="59-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.createWebView">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">createWebView</span></span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.createWebView" title="永久链接至目标">#</a></dt>
<dd><p>创建WebView控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>id</strong> (<em>number</em>) – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>url</strong> (<em>string</em>) – 加载的链接</p></li>
<li><p><strong>x</strong> (<em>number</em>) – 控件在屏幕上x坐标，值为-1时自动填充宽高</p></li>
<li><p><strong>y</strong> (<em>number</em>) – 控件在屏幕上y坐标，值为-1时自动填充宽高</p></li>
<li><p><strong>width</strong> (<em>number</em>) – 控件宽度，值为-1时自动填充宽高</p></li>
<li><p><strong>height</strong> (<em>number</em>) – 控件高度，值为-1时自动填充宽高</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-59-59-1" class="sphinx-tabs-panel" hidden="true" id="panel-59-59-1" name="59-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.create_web_view">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">create_web_view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.create_web_view" title="永久链接至目标">#</a></dt>
<dd><p>创建WebView控件</p>
<dl class="field-list simple">
<dt class="field-odd">参数<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>_id</strong> – 控件ID，不可与其他控件重复</p></li>
<li><p><strong>url</strong> – 加载的链接</p></li>
<li><p><strong>x</strong> – 控件在屏幕上 x 坐标，值为 -1 时自动填充宽高</p></li>
<li><p><strong>y</strong> – 控件在屏幕上 y 坐标，值为 -1 时自动填充宽高</p></li>
<li><p><strong>width</strong> – 控件宽度，值为 -1 时自动填充宽高</p></li>
<li><p><strong>height</strong> – 控件高度，值为 -1 时自动填充宽高</p></li>
</ul>
</dd>
<dt class="field-even">返回<span class="colon">:</span></dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="clearscriptcontrol">
<h3>清除脚本控件 <code class="docutils literal notranslate"><span class="pre">clearScriptControl()</span></code><a class="headerlink" href="#clearscriptcontrol" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-60-60-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-60-60-0" name="60-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-60-60-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-60-60-1" name="60-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-60-60-0" class="sphinx-tabs-panel" id="panel-60-60-0" name="60-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.clearScriptControl">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">clearScriptControl</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.clearScriptControl" title="永久链接至目标">#</a></dt>
<dd><p>清除脚本控件</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;boolean&gt;</strong> – 成功返回true，失败返回 false</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-60-60-1" class="sphinx-tabs-panel" hidden="true" id="panel-60-60-1" name="60-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.clear_script_widget">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">clear_script_widget</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.clear_script_widget" title="永久链接至目标">#</a></dt>
<dd><p>清除脚本控件</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
<section id="getscriptparam">
<h3>获取脚本配置参数 <code class="docutils literal notranslate"><span class="pre">getScriptParam()</span></code><a class="headerlink" href="#getscriptparam" title="此标题的永久链接">#</a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-61-61-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-61-61-0" name="61-0" role="tab" tabindex="0">JavaScript</button><button aria-controls="panel-61-61-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-61-61-1" name="61-1" role="tab" tabindex="-1">Python</button></div><div aria-labelledby="tab-61-61-0" class="sphinx-tabs-panel" id="panel-61-61-0" name="61-0" role="tabpanel" tabindex="0"><dl class="js function">
<dt class="sig sig-object js" id="AndroidBot.getScriptParam">
<span class="sig-prename descclassname"><span class="n"><span class="pre">AndroidBot</span></span><span class="p"><span class="pre">.</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">getScriptParam</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#AndroidBot.getScriptParam" title="永久链接至目标">#</a></dt>
<dd><p>获取脚本配置参数</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>Promise.&lt;JSON&gt;</strong> – 成功返回{“id”:”text”, “id”:”isSelect”} 此类对象，失败返回null。函数仅返回TextEdit和CheckBox控件值，需要用户点击安卓端 “提交参数” 按钮</p>
</dd>
</dl>
</dd></dl>

</div><div aria-labelledby="tab-61-61-1" class="sphinx-tabs-panel" hidden="true" id="panel-61-61-1" name="61-1" role="tabpanel" tabindex="0"><dl class="py method">
<dt class="sig sig-object py" id="AiBot.AndroidBotMain.get_script_params">
<span class="sig-prename descclassname"><span class="pre">AndroidBotMain.</span></span><span class="sig-name descname"><span class="pre">get_script_params</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#AiBot.AndroidBotMain.get_script_params" title="永久链接至目标">#</a></dt>
<dd><p>获取脚本参数</p>
<dl class="field-list simple">
<dt class="field-odd">返回<span class="colon">:</span></dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>

</div></div>
</section>
</section>
</section>


                </article>
              
              
              
                <footer class="bd-footer-article">
                  <!-- Previous / next buttons -->
<div class="prev-next-area">
    <a class="left-prev"
       href="../index.html"
       title="previous page">
      <i class="fa-solid fa-angle-left"></i>
      <div class="prev-next-info">
        <p class="prev-next-subtitle">上一页</p>
        <p class="prev-next-title">Aibote 开发手册</p>
      </div>
    </a>
    <a class="right-next"
       href="../web_bot/index.html"
       title="next page">
      <div class="prev-next-info">
        <p class="prev-next-subtitle">下一页</p>
        <p class="prev-next-title">WebBot</p>
      </div>
      <i class="fa-solid fa-angle-right"></i>
    </a>
</div>
                </footer>
              
            </div>
            
            
              
                <div class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">

  <div class="sidebar-secondary-item">
  <div class="page-toc tocsection onthispage">
    <i class="fa-solid fa-list"></i> On this page
  </div>
  <nav class="bd-toc-nav page-toc">
    <ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id1">主函数示例</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id2">等待超时</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.setImplicitTimeout"><code class="docutils literal notranslate"><span class="pre">AndroidBot.setImplicitTimeout()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.todo"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id3">图片与颜色</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#savescreenshot">截图保存 <code class="docutils literal notranslate"><span class="pre">saveScreenshot()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.saveScreenshot"><code class="docutils literal notranslate"><span class="pre">AndroidBot.saveScreenshot()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.save_screenshot"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.save_screenshot()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#findimage">找图 <code class="docutils literal notranslate"><span class="pre">findImage()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.findImage"><code class="docutils literal notranslate"><span class="pre">AndroidBot.findImage()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.find_image"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.find_image()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#findanimation">找动态图 <code class="docutils literal notranslate"><span class="pre">findAnimation()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.findAnimation"><code class="docutils literal notranslate"><span class="pre">AndroidBot.findAnimation()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.find_dynamic_image"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.find_dynamic_image()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getcolor">获取颜色值 <code class="docutils literal notranslate"><span class="pre">getColor()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.findColor"><code class="docutils literal notranslate"><span class="pre">AndroidBot.findColor()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.find_color"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.find_color()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#comparecolor">比色 <code class="docutils literal notranslate"><span class="pre">compareColor()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.compareColor"><code class="docutils literal notranslate"><span class="pre">AndroidBot.compareColor()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#id0"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#findcolor">找色 <code class="docutils literal notranslate"><span class="pre">findColor()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.findColor"><code class="docutils literal notranslate"><span class="pre">AndroidBot.findColor()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#id4"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.find_color()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#ocr">OCR系统</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#findwords">获取文字坐标 <code class="docutils literal notranslate"><span class="pre">findWords()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.findWords"><code class="docutils literal notranslate"><span class="pre">AndroidBot.findWords()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.find_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.find_text()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getwords">获取屏幕文字 <code class="docutils literal notranslate"><span class="pre">getWords()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getWords"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getWords()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_text()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id5">点击手势</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#click">单击 <code class="docutils literal notranslate"><span class="pre">click()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.click"><code class="docutils literal notranslate"><span class="pre">AndroidBot.click()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.click"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.click()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#doubleclick">双击 <code class="docutils literal notranslate"><span class="pre">doubleClick()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.doubleClick"><code class="docutils literal notranslate"><span class="pre">AndroidBot.doubleClick()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.double_click"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.double_click()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#press">按下 <code class="docutils literal notranslate"><span class="pre">press()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.press"><code class="docutils literal notranslate"><span class="pre">AndroidBot.press()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#id6"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#longclick">长按 <code class="docutils literal notranslate"><span class="pre">longClick()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.longClick"><code class="docutils literal notranslate"><span class="pre">AndroidBot.longClick()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.long_click"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.long_click()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#release">抬起 <code class="docutils literal notranslate"><span class="pre">release()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.release"><code class="docutils literal notranslate"><span class="pre">AndroidBot.release()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#id7"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#move">移动 <code class="docutils literal notranslate"><span class="pre">move()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.move"><code class="docutils literal notranslate"><span class="pre">AndroidBot.move()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.move"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.move()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#swipe">滑动 <code class="docutils literal notranslate"><span class="pre">swipe()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.swipe"><code class="docutils literal notranslate"><span class="pre">AndroidBot.swipe()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.swipe"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.swipe()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#dispatchgesture">执行手势 <code class="docutils literal notranslate"><span class="pre">dispatchGesture()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.dispatchGesture"><code class="docutils literal notranslate"><span class="pre">AndroidBot.dispatchGesture()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.gesture"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.gesture()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#dispatchgestures">执行多个手势 <code class="docutils literal notranslate"><span class="pre">dispatchGestures()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.dispatchGestures"><code class="docutils literal notranslate"><span class="pre">AndroidBot.dispatchGestures()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#id8"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id9">发送文本</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.sendKeys"><code class="docutils literal notranslate"><span class="pre">AndroidBot.sendKeys()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.send_keys"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.send_keys()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id10">发送按键</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#back">返回 <code class="docutils literal notranslate"><span class="pre">back()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.back"><code class="docutils literal notranslate"><span class="pre">AndroidBot.back()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.back"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.back()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#home">返回桌面 <code class="docutils literal notranslate"><span class="pre">home()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.home"><code class="docutils literal notranslate"><span class="pre">AndroidBot.home()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.home"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.home()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#recents">显示最近任务 <code class="docutils literal notranslate"><span class="pre">recents()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.recents"><code class="docutils literal notranslate"><span class="pre">AndroidBot.recents()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.recent_tasks"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.recent_tasks()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#sendvk">发送按键值 <code class="docutils literal notranslate"><span class="pre">sendVk()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.sendVk"><code class="docutils literal notranslate"><span class="pre">AndroidBot.sendVk()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.send_vk"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.send_vk()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#app">启动APP</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.startApp"><code class="docutils literal notranslate"><span class="pre">AndroidBot.startApp()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.start_app"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.start_app()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id11">屏幕大小</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getWindowSize"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getWindowSize()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_window_size"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_window_size()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id12">图片大小</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getImageSize"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getImageSize()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_image_size"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_image_size()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id">获取安卓ID</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getAndroidId"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getAndroidId()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_android_id"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_android_id()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#url">URL请求</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.urlRequest"><code class="docutils literal notranslate"><span class="pre">AndroidBot.urlRequest()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id13"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#toast">Toast消息提示</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.showToast"><code class="docutils literal notranslate"><span class="pre">AndroidBot.showToast()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.show_toast"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.show_toast()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id14">验证码系统</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getCaptcha"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getCaptcha()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id15"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.todo()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id16">元素操作</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#clickelement">点击元素 <code class="docutils literal notranslate"><span class="pre">clickElement()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.clickElement"><code class="docutils literal notranslate"><span class="pre">AndroidBot.clickElement()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.click_element"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.click_element()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#clickelementbyslide">滑动并点击元素 <code class="docutils literal notranslate"><span class="pre">clickElementBySlide()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.click_element_by_slide"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.click_element_by_slide()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#clickanyelements">遍历点击元素 <code class="docutils literal notranslate"><span class="pre">clickAnyElements</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.click_any_elements"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.click_any_elements()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getelementtext">获取元素文本 <code class="docutils literal notranslate"><span class="pre">getElementText()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getElementText"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getElementText()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_element_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_element_text()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#setelementtext">设置文本 <code class="docutils literal notranslate"><span class="pre">setElementText</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.setElementText"><code class="docutils literal notranslate"><span class="pre">AndroidBot.setElementText()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.set_element_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.set_element_text()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getelementdescription">获取元素描述 <code class="docutils literal notranslate"><span class="pre">getElementDescription()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getElementDescription"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getElementDescription()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_element_desc"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_element_desc()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getelementrect">获取元素矩形位置 <code class="docutils literal notranslate"><span class="pre">getElementRect()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getElementRect"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getElementRect()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_element_rect"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_element_rect()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#existselement">判断元素是否存在 <code class="docutils literal notranslate"><span class="pre">existsElement()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.existsElement"><code class="docutils literal notranslate"><span class="pre">AndroidBot.existsElement()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.element_exists"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.element_exists()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#elementnotexists">元素是否不存在 <code class="docutils literal notranslate"><span class="pre">elementNotExists()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.element_not_exists"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.element_not_exists()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#anyelementsexists">判断任意是否元素存在 <code class="docutils literal notranslate"><span class="pre">anyElementsExists()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.any_elements_exists"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.any_elements_exists()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#isselectedelement">判断元素是否选中 <code class="docutils literal notranslate"><span class="pre">isSelectedElement()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.isSelectedElement"><code class="docutils literal notranslate"><span class="pre">AndroidBot.isSelectedElement()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.element_is_selected"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.element_is_selected()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#scrollelement">滚动元素 <code class="docutils literal notranslate"><span class="pre">scrollElement()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.scrollElement"><code class="docutils literal notranslate"><span class="pre">AndroidBot.scrollElement()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.scroll_element"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.scroll_element()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id17">文件传输</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pushfile">上传文件到手机 <code class="docutils literal notranslate"><span class="pre">pushFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.pushFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.pushFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.push_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.push_file()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pullfile">拉取文件到电脑 <code class="docutils literal notranslate"><span class="pre">pullFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.pullFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.pullFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.pull_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.pull_file()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id18">安卓文件操作</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#writeandroidfile">写入安卓文件 <code class="docutils literal notranslate"><span class="pre">writeAndroidFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.writeAndroidFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.writeAndroidFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.write_android_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.write_android_file()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#readandroidfile">读取安卓文件 <code class="docutils literal notranslate"><span class="pre">readAndroidFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.readAndroidFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.readAndroidFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.read_android_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.read_android_file()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#deleteandroidfile">删除安卓文件 <code class="docutils literal notranslate"><span class="pre">deleteAndroidFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.deleteAndroidFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.deleteAndroidFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.delete_android_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.delete_android_file()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#existsandroidfile">判断文件是否存在 <code class="docutils literal notranslate"><span class="pre">existsAndroidFile()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.existsAndroidFile"><code class="docutils literal notranslate"><span class="pre">AndroidBot.existsAndroidFile()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.exists_android_file"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.exists_android_file()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#intent">Intent跳转</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#uri-openuri">跳转uri <code class="docutils literal notranslate"><span class="pre">openUri()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.openUri"><code class="docutils literal notranslate"><span class="pre">AndroidBot.openUri()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.open_uri"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.open_uri()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#callphone">拨打电话 <code class="docutils literal notranslate"><span class="pre">callPhone()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.callPhone"><code class="docutils literal notranslate"><span class="pre">AndroidBot.callPhone()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.call_phone"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.call_phone()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#sendmsg">发送短信 <code class="docutils literal notranslate"><span class="pre">sendMsg()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.sendMsg"><code class="docutils literal notranslate"><span class="pre">AndroidBot.sendMsg()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.send_msg"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.send_msg()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id19">获取包名/窗口</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#activity-getactivity">返回当前activity <code class="docutils literal notranslate"><span class="pre">getActivity()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getActivity"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getActivity()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_activity"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_activity()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#package-getpackage">返回当前package <code class="docutils literal notranslate"><span class="pre">getPackage()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getPackage"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getPackage()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_package"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_package()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id20">安卓剪切板</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#setclipboardtext">设置剪切板内容 <code class="docutils literal notranslate"><span class="pre">setClipboardText()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.setClipboardText"><code class="docutils literal notranslate"><span class="pre">AndroidBot.setClipboardText()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.set_clipboard_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.set_clipboard_text()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getclipboardtext">获取剪切板内容 <code class="docutils literal notranslate"><span class="pre">getClipboardText()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getClipboardText"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getClipboardText()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_clipboard_text"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_clipboard_text()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id21">创建脚本控件</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#textview-createtextview">创建TextView控件 <code class="docutils literal notranslate"><span class="pre">createTextView()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.createTextView"><code class="docutils literal notranslate"><span class="pre">AndroidBot.createTextView()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.create_text_view"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.create_text_view()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#edittext-createedittext">创建EditText控件 <code class="docutils literal notranslate"><span class="pre">createEditText()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.createEditText"><code class="docutils literal notranslate"><span class="pre">AndroidBot.createEditText()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.create_edit_view"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.create_edit_view()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#checkbox-createcheckbox">创建CheckBox控件 <code class="docutils literal notranslate"><span class="pre">createCheckBox()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.createCheckBox"><code class="docutils literal notranslate"><span class="pre">AndroidBot.createCheckBox()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.create_check_box"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.create_check_box()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#webview-createwebview">创建WebView控件 <code class="docutils literal notranslate"><span class="pre">createWebView()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.createWebView"><code class="docutils literal notranslate"><span class="pre">AndroidBot.createWebView()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.create_web_view"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.create_web_view()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#clearscriptcontrol">清除脚本控件 <code class="docutils literal notranslate"><span class="pre">clearScriptControl()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.clearScriptControl"><code class="docutils literal notranslate"><span class="pre">AndroidBot.clearScriptControl()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.clear_script_widget"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.clear_script_widget()</span></code></a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#getscriptparam">获取脚本配置参数 <code class="docutils literal notranslate"><span class="pre">getScriptParam()</span></code></a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AndroidBot.getScriptParam"><code class="docutils literal notranslate"><span class="pre">AndroidBot.getScriptParam()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#AiBot.AndroidBotMain.get_script_params"><code class="docutils literal notranslate"><span class="pre">AndroidBotMain.get_script_params()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
  </nav></div>

</div></div>
              
            
          </div>
          <footer class="bd-footer-content">
            <div class="bd-footer-content__inner"></div>
          </footer>
        
      </main>
    </div>
  </div>
  
  <!-- Scripts loaded after <body> so the DOM is not blocked -->
  <script src="../../_static/scripts/bootstrap.js?digest=12da95d707ffb74b382d"></script>
<script src="../../_static/scripts/pydata-sphinx-theme.js?digest=12da95d707ffb74b382d"></script>

  <footer class="bd-footer">
<div class="bd-footer__inner bd-page-width">
  
    <div class="footer-items__start">
      
        <div class="footer-item">
  <p class="copyright">
    
      © Copyright 2023, Aibote.
      <br/>
    
  </p>
</div>
      
        <div class="footer-item">
  <p class="sphinx-version">
    Created using <a href="https://sphinx-doc.org/">Sphinx</a> 5.3.0.
    <br/>
  </p>
</div>
      
    </div>
  
  
    <div class="footer-items__end">
      
        <div class="footer-item"><p class="theme-version">
  Built with the <a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html">PyData Sphinx Theme</a> 0.13.1.
</p></div>
      
    </div>
  
</div>

  </footer>
  </body>
</html>